Skip to content

ci: add .pr/ artifact convention to extensions - #545

Merged
enyst merged 3 commits into
mainfrom
openhands/add-pr-artifacts-convention
Sep 11, 2026
Merged

ci: add .pr/ artifact convention to extensions#545
enyst merged 3 commits into
mainfrom
openhands/add-pr-artifacts-convention

Conversation

@all-hands-bot

@all-hands-bot all-hands-bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

HUMAN:
This PR proposes adding the same temporary .pr/ workflow used by the other OpenHands repositories. No manual approval or merge test was run because that would require disposable same-repository and fork PRs; the existing CI suite passed, and reviewer verification steps are below.

  • A human has tested these changes.

Why

The .pr/ PR-artifacts convention is established across OpenHands, software-agent-sdk, and automation, but is missing from extensions. This adds the workflow and documentation so the convention is consistent across all four repositories.

Summary

  • Add .github/workflows/pr-artifacts.yml with parity to software-agent-sdk: comment when .pr/ exists, remove it from same-repository PR branches after approval, and remove it from main after merging fork PRs.
  • Document the .pr/ convention in AGENTS.md.
  • Remove five orphaned custom-automation-*.png screenshots that were committed to .pr/ on main.

Issue Number

Fixes #546

How to Test

  1. Confirm the existing repository test, extension sync, SDK skill sync, Claude Code validation, and deprecation deadline checks pass.
  2. Review .github/workflows/pr-artifacts.yml and verify pull_request_target only reads fork contents through the GitHub API; it never checks out or executes fork code with a write token.
  3. In a disposable same-repository PR containing .pr/notes.md, verify the workflow posts one notice and removes .pr/ after approval.
  4. In a disposable fork PR containing .pr/notes.md, verify the workflow posts one notice and removes .pr/ from the base branch after merge.

Video/Screenshots

Not applicable - this is a CI workflow and repository documentation change.

Notes

The .pr/ notice is informational and does not block merging.


This PR description was updated by an AI agent (OpenHands) on behalf of the user.

Add the PR Artifacts workflow and document the .pr/ convention in
AGENTS.md, matching the convention already present in OpenHands,
software-agent-sdk, and automation. Also remove five orphaned
custom-automation screenshots that were committed directly to main
instead of living in a PR's temporary .pr/ directory.

Co-authored-by: openhands <openhands@all-hands.dev>
@all-hands-bot

Copy link
Copy Markdown
Contributor Author

👋 This PR needs a couple of things fixed before OpenHands can review it:

  • the PR description's HUMAN: section needs at least 20 characters describing what you tested, not just the template placeholder

Push an update once this is addressed and this check re-runs automatically.

This is an automated check - no AI was used to generate this comment.

@github-actions github-actions Bot added the type: ci CI configuration changes label Sep 9, 2026
@enyst

enyst commented Sep 9, 2026

Copy link
Copy Markdown
Member

@OpenHands understand why CI PR description fails and fix it please.

@openhands-ai

openhands-ai Bot commented Sep 9, 2026

Copy link
Copy Markdown

I'm on it! enyst can track my progress at all-hands.dev

enyst commented Sep 9, 2026

Copy link
Copy Markdown
Member

Fixed. The current PR Description Check was failing for two concrete reasons:

  • the body was missing the required ## How to Test section;
  • the body had no issue in ## Issue Number, which the current validator requires.

I created and linked #546, confirmed it received ready-for-dev, restored the current PR template sections, and added specific verification steps. I also rewrote the HUMAN: text to state what was and was not manually tested, addressing the earlier bot feedback.

The refreshed PR Description Check now passes, and all 8 PR checks are green. No source change or additional commit was needed because the failure was entirely in PR metadata.

This comment was created by an AI agent (OpenHands) on behalf of the user.

@openhands-ai

openhands-ai Bot commented Sep 9, 2026

Copy link
Copy Markdown

Resolved on PR #545.

  • Root cause: the current validator required ## How to Test and a linked issue in ## Issue Number.
  • Created and linked issue #546, which received ready-for-dev.
  • Updated the PR description with the current template, concrete verification steps, and clearer HUMAN: testing details.
  • Posted the diagnosis and resolution on the PR.
  • Verified all 8 PR checks are now passing.

No code changes, commit, or push were needed because the failure was entirely in PR metadata.

@enyst enyst left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔴 Needs improvement

[CRITICAL ISSUES]

  • The PAT-backed approval cleanup lacks an authorization check for the reviewer. See the inline finding.

[IMPROVEMENT OPPORTUNITIES]

  • The advertised manual trigger cannot execute any job. See the inline finding.

[RISK ASSESSMENT]

  • [Overall PR] ⚠️ Risk Assessment: 🟡 MEDIUM
    This adds a security-sensitive workflow with repository write access and a bot PAT. Fork code is correctly kept out of privileged execution, but the approval-to-write authorization boundary must be explicit in the workflow rather than assumed from repository settings.

VERDICT:
Needs rework: Do not enable the privileged cleanup path until it verifies that the approving reviewer has repository write permission.

KEY INSIGHT:
Copying an established workflow also copies its trust assumptions; privileged automation must enforce those assumptions itself.

This review was created by an AI agent (OpenHands) on behalf of the user.


Improve this review? If any feedback above seems incorrect or irrelevant to this repository, you can teach the reviewer to do better:

  1. Add a .agents/skills/custom-codereview-guide.md file to your branch (or edit it if one already exists) with the /codereview trigger and the context the reviewer is missing (e.g., "Security concerns about X do not apply here because Y"). See the customization docs for the required frontmatter format.
  2. Re-request a review - the reviewer reads guidelines from the PR branch, so your changes take effect immediately.
  3. When your PR is merged, the guideline file goes through normal code review by repository maintainers.

Resolve with AI? Install the iterate skill in your agent and run /iterate to automatically drive this PR through CI, review, and QA until it is merge-ready.

Was this review helpful? React with 👍 or 👎 to give feedback.


Comment thread .github/workflows/pr-artifacts.yml
Comment thread .github/workflows/pr-artifacts.yml
@all-hands-bot

Copy link
Copy Markdown
Contributor Author

🚦 CI is currently failing on this PR's latest commit.

Please fix the failing checks before OpenHands reviews it - this is re-checked automatically once you push a new commit. (A maintainer can also request @all-hands-bot as a reviewer to have it reviewed regardless of CI status.)

This is an automated check - no AI was used to generate this comment.

… main

Co-authored-by: openhands <openhands@all-hands.dev>
@all-hands-bot

Copy link
Copy Markdown
Contributor Author

🤖 OpenHands is reviewing this PR.

Head commit: 7baba2ecac4b71c77ab1d07f7163956215763ce8
View the conversation: https://oss-agent-canvas.ngrok.dev/conversations/fb06c633-edef-4e60-bb5c-944d6ea99ae9

This comment was posted by an AI agent (OpenHands).

Co-authored-by: openhands <openhands@all-hands.dev>
@all-hands-bot

Copy link
Copy Markdown
Contributor Author

🤖 OpenHands is reviewing this PR.

Head commit: 4deccbfed452ca4dd9865829a418fa2d25d2d88d
View the conversation: https://oss-agent-canvas.ngrok.dev/conversations/346e30d1-3f35-4028-831f-4b8b11ac3433

This comment was posted by an AI agent (OpenHands).

@all-hands-bot

Copy link
Copy Markdown
Contributor Author

⚠️ OpenHands PR Reviewer encountered a problem at commit 4deccbfed452 (status: error).

This comment was posted by an AI agent (OpenHands).

@enyst enyst left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Good taste — The repository now adopts the same API-only fork inspection and cleanup-PR model as the just-merged software-agent-sdk #4933. I re-evaluated my earlier authorization concern: the approval job cannot act on a fork, executes no PR code, and performs only the deterministic removal of .pr/ on a same-repository branch, while normal reviews and checks still protect merge. Reviewer-permission and exact-reviewed-SHA checks would be useful defense-in-depth, but are not blockers for parity with the accepted shared design. All current checks are green.

[RISK ASSESSMENT]

  • [Overall PR] ⚠️ Risk Assessment: 🟡 MEDIUM
    This introduces a write-capable PAT workflow, but the write scope is operationally narrow, untrusted fork code never receives credentials, and default-branch cleanup is mediated by an ordinary protected PR.

VERDICT:
Worth merging: The implementation follows the accepted cross-repository convention and preserves branch protections.

KEY INSIGHT:
The workflow treats .pr/ as disposable repository state without granting fork code a privileged execution path.

This review was generated by an AI agent (OpenHands) on behalf of @enyst.

@enyst
enyst merged commit e43710b into main Sep 11, 2026
17 checks passed
@enyst
enyst deleted the openhands/add-pr-artifacts-convention branch September 11, 2026 05:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: ci CI configuration changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Adopt temporary .pr/ artifacts convention

3 participants